//
//  BillSelectSectionHeaderView.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/8.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "BillSelectSectionHeaderView.h"
#import <Masonry.h>
@implementation BillSelectSectionHeaderView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews{
    
    self.backgroundColor = [UIColor colorWithRed:248 / 255.0 green:248 / 255.0 blue:248 / 255.0 alpha:1];
    
    self.dateBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.dateBtn setTitle:@"本月" forState:(UIControlStateNormal)];
    [self.dateBtn setTitleColor:[UIColor colorWithRed:51 / 255.0 green:51 / 255.0 blue:51 / 255.0 alpha:1] forState:(UIControlStateNormal)];
    self.dateBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
    [self addSubview:self.dateBtn];
    [self.dateBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.left.mas_equalTo(16);
    }];
    
    /*
    self.dateImv = [[UIImageView alloc] init];
    self.dateImv.image = [UIImage imageNamed:@"icon_arrow_down"];
    [self addSubview:self.dateImv];
    [self.dateImv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.dateBtn.mas_right);
        make.centerY.equalTo(self);
        make.width.mas_equalTo(16);
        make.height.mas_equalTo(16);
    }];
     */
    
    self.consumeTimesLab = [[UILabel alloc] init];
    self.consumeTimesLab.text = @"";
    self.consumeTimesLab.textColor = [UIColor colorWithRed:102 / 255.0 green:102 / 255.0 blue:102 / 255.0 alpha:1];
    self.consumeTimesLab.font = [UIFont systemFontOfSize:12.0f];
    self.consumeTimesLab.textColor = [UIColor colorWithRed:102 / 255.0 green:102 / 255.0 blue:102 / 255.0 alpha:1];
    [self addSubview:self.consumeTimesLab];
    [self.consumeTimesLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-15);
        make.centerY.equalTo(self);
    }];
    
    self.consumeLab = [[UILabel alloc] init];
    self.consumeLab.text = @"";
    self.consumeLab.textColor = [UIColor colorWithRed:102 / 255.0 green:102 / 255.0 blue:102 / 255.0 alpha:1];
    self.consumeLab.font = [UIFont systemFontOfSize:12.0f];
    self.consumeLab.textColor = [UIColor colorWithRed:102 / 255.0 green:102 / 255.0 blue:102 / 255.0 alpha:1];
    [self addSubview:self.consumeLab];
    [self.consumeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.consumeTimesLab.mas_left).offset(-5);
        make.centerY.equalTo(self);
    }];
}

@end
